<template>
<div id="app">
  <router-view>
  </router-view>
  <!-- h5 -->
  <!--<header class="visible-xs">-->
    <!--<div class="nav-h5">-->
      <!--<router-link class="tabbar" to="/" @click.native="tabA">-->
        <!--<p v-if="tabbar =='a'">-->
          <!--<img src="../static/img/tabbar/home-active.png" alt="">-->
        <!--</p>-->
        <!--<p v-if="tabbar =='a'" style="color:rgb(237, 29, 36)">首页</p>-->
        <!--<p v-if="tabbar !=='a'">-->
          <!--<img src="../static/img/tabbar/home.png" alt="">-->
        <!--</p>-->
        <!--<p v-if="tabbar !=='a'">首页</p>-->
      <!--</router-link>-->
      <!--<router-link class="tabbar" to="/rank" @click.native="tabB">-->
        <!--<p v-if="tabbar =='b'">-->
          <!--<img src="../static/img/tabbar/rank-active.png" alt="">-->
        <!--</p>-->
        <!--<p v-if="tabbar =='b'" style="color:rgb(237, 29, 36)">盘手榜</p>-->
        <!--<p v-if="tabbar !=='b'">-->
          <!--<img src="../static/img/tabbar/rank.png" alt="">-->
        <!--</p>-->
        <!--<p v-if="tabbar !=='b'">盘手榜</p>-->
      <!--</router-link>-->
    <!--</div>-->
  <!--</header>-->
</div>
</template>

<script>
import {initWx} from './service/Weixin'
// import {track} from './statistics/mongo';

export default {
  name: 'app',
  data() {
    let tabbar = 'a';
    return {
      tabbar: tabbar
    }
  },
  created () {
    initWx();
    // statisics 进入页面统计
    // track('enter', {});
  },
  methods: {
    tabA() {
//      window.alert('1  被点击了');
      this.tabbar = 'a'
    },
    tabB() {
//      window.alert('2  被点击了');
      this.tabbar = 'b'
    }
  }
}
</script>

<style lang="scss">
@import './style/common';
@import './style/weui.min';
#app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    font-size: 14px;
    // margin-top: 60px;
}
.nav-h5 {
  display: flex;
  position: fixed;
  padding: 1.3rem 0;
  height: 6rem;
  line-height: 2rem;
  width: 100%;
  index: 99;
  bottom: 0;
  background-color: #f3f3f3;
  font-size: 10px;
  .tabbar {
    flex-grow: 1;
    text-decoration:none;
    img {
      height: 2.5rem;
    }
  }
}
</style>
